{__NOLAYOUT__}
<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8"> 
	<meta name="viewport" content="width=device-width, initial-scale=1.0 ,maximum-scale=1.0, user-scalable=no">
	<title>交易</title>
	<link rel="stylesheet" href="__CDN__/assets/css/bootstrap.min.css">
  <link rel="stylesheet" type="text/css" href="__CDN__/assets/css/detail5.css">
  <link rel="stylesheet" href="__CDN__/assets/css/swiper.min.css">

	<script src="__CDN__/assets/libs/jquery/dist/jquery.min.js"></script>
	<script src="__CDN__/assets/libs/bootstrap/dist/js/bootstrap.min.js"></script>
  <script src="__CDN__/assets/js/detail.js"></script>
  <script src="__CDN__/assets/js/getcode.js"></script>

</head>
<body>
      <!-- <div class="jiaoyi_heard">
         <p>交易</p>
      </div> -->

       {include file="common/heard"}



    <div class="wrap">
      <div class="tabs">
        <a href="#" hidefocus="true" class="active">买入</a>
        <a href="#" hidefocus="true">卖出</a>
        <a href="#" hidefocus="true">当前委托</a>
        <a href="#" hidefocus="true">历史委托</a>
      </div>    
    <div class="swiper-container">
        <div class="swiper-wrapper">
        <div class="swiper-slide">
           <div class="content-slide">
      
              <form method="post" action="{:url('order/buy')}" onSubmit="return Check_full_01()" name="form1">

              	 <div class="jiaoyi_form_one">
              	 	<div class="jiaoyi_form_one_k">
              	 		<span>委托价格</span>
              	 	</div>
              	 	<div class="jiaoyi_form_one_v">
              	 		<input type="text" value="{$site.market_price}" readOnly="true" id="one_price_in">
              	 	</div>
              	 </div>
              	 <div class="jiaoyi_form_one">
              	 	<div class="jiaoyi_form_one_k">
              	 		<span>委托数量</span>
              	 	</div>
              	 	<div class="jiaoyi_form_one_v">
              	 		<input type="text" name="money" value="" placeholder="请输入委托数量" id="sum_num_in" placeholder="请输入委托数量"  onkeyup="if(this.value.length==1){this.value=this.value.replace(/[^1-9]/g,'')}else{this.value=this.value.replace(/\D/g,'')}"  onafterpaste="if(this.value.length==1){this.value=this.value.replace(/[^1-9]/g,'0')}else{this.value=this.value.replace(/\D/g,'')}" onchange="entrust_in(this.value)">
              	 	</div>
              	 </div>
              	 <div class="jiaoyi_form_one">
              	 	<div class="jiaoyi_form_one_k">
              	 		<span>当前总价</span>
              	 	</div>
              	 	<div class="jiaoyi_form_one_v">
              	 		<input type="text" value="0.00" readonly="true" id="sum_price_in">
              	 	</div>
              	 </div> 
              	  <div class="jiaoyi_form_code">
              	 	<div class="jiaoyi_form_code_k">
              	 		<span>支付密码</span>
              	 	</div>
              	 	<div class="jiaoyi_form_code_v">
              	 		<input type="text" name="pay_password" value=""  placeholder="请输入支付密码" onchange="entrust_in2(this.value)">
              	 	</div>
              	 	<div class="jiaoyi_form_code_c">


                  <a id="regetcode" style="display: none;" type="button"><span id="second">60</span><span>秒后重发</span></a>

              	 	</div>
              	 </div> 
              	 <div class="jiaoyi_form_num">
              	 	<span>可用财富宝</span>&nbsp;<span style="color: #1C86EE;">{$user.money}</span>
                  <span class="jiaoyi_form_shouxufei" style="color: green">奖励：{$site.buy_fee*100}%</span>
              	 </div> 
              	 <div class="jiaoyi_form_submit">
              	 	<input type="submit" name="" class="btn btn-defaul" value="买入财富宝" style="background-color: #1C86EE;">
              	 </div>            	 
              </form>

              <div class="jiaoyi_info" style="display: none;">
              	<div class="jiaoyi_info_title">
              		<span style="font-weight: 600;">|</span>&nbsp;&nbsp;&nbsp;&nbsp;<span>卖出信息</span>
              	</div>
              	<div class="jiaoyi_info_list">
              		<table class="table table-hover">
                      <tr>
                      	<th>时间</th>
                      	<th>价格</th>
                      	<th>财富宝</th>
                      </tr>
                      {volist name="sell_list" id="vo"}
                      <tr>
                      	<td>{$vo.createtime|datetime}</td>
                      	<td>{$vo.market_price}</td>
                      	<td>{$vo.money}</td>
                      </tr>
                      {/volist}
                     </table>
              	</div>
              </div>
          </div>
          </div>
        <div class="swiper-slide">
            <div class="content-slide">


                 <form method="post" action="{:url('order/sell')}" onSubmit="return Check_full_02()" name="form2">
              	 <div class="jiaoyi_form_one" style="display: none;">

              	 	<div class="jiaoyi_form_one_k">
              	 		<span>委托价格</span>
              	 	</div>
              	 	<div class="jiaoyi_form_one_v">
              	 		<input type="text" value="{$site.market_price}" readOnly="true" id="one_price_out">
              	 	</div>
              	 </div>
              	 <div class="jiaoyi_form_one">
              	 	<div class="jiaoyi_form_one_k">
              	 		<span>委托数量</span>
              	 	</div>
              	 	<div class="jiaoyi_form_one_v">
              	 		<input type="text" name="money" value="" placeholder="请输入委托数量" id="sum_num_out"   onkeyup="if(this.value.length==1){this.value=this.value.replace(/[^1-9]/g,'')}else{this.value=this.value.replace(/\D/g,'')}"  onafterpaste="if(this.value.length==1){this.value=this.value.replace(/[^1-9]/g,'0')}else{this.value=this.value.replace(/\D/g,'')}" onchange="entrust_out(this.value)">
              	 	</div>
              	 </div>
              	 <div class="jiaoyi_form_one">
              	 	<div class="jiaoyi_form_one_k">
              	 		<span>当前总价</span>
              	 	</div>
              	 	<div class="jiaoyi_form_one_v">
              	 		<input type="text" value="0.00" readonly="true" id="sum_price_out">
              	 	</div>
              	 </div> 
              	  <div class="jiaoyi_form_code">
              	 	<div class="jiaoyi_form_code_k">
              	 		<span>支付密码</span>
              	 	</div>
              	 	<div class="jiaoyi_form_code_v">
              	 		<input type="text" name="pay_password" value=""  placeholder="请输入支付密码" onchange="entrust_out2(this.value)">
              	 	</div>
              	 	<div class="jiaoyi_form_code_c">


                  <a id="regetcode2" style="display: none;" type="button"><span id="second2">60</span><span>秒后重发</span></a>

                  

              	 	</div>
              	 </div> 
              	 <div class="jiaoyi_form_num">
              	 	<span>可用财富宝</span>&nbsp;<span style="color: #1C86EE;">{$user.money}</span>
              	 	<span class="jiaoyi_form_shouxufei">手续费：{$site.sell_fee*100}%</span>
              	 </div> 
              	 <div class="jiaoyi_form_submit">
              	 	<input type="submit" name="" class="btn btn-defaul" value="卖出财富宝" style="background-color: #1C86EE;">
              	 </div>            	 
              </form>

              <div class="jiaoyi_info" style="display: none;">
              	<div class="jiaoyi_info_title">
              		<span style="font-weight: 600;">|</span>&nbsp;&nbsp;&nbsp;&nbsp;<span>买入信息</span>
              	</div>
              	<div class="jiaoyi_info_list">
              		<table class="table table-hover">
                      <tr>
                      	<th>时间</th>
                      	<th>价格</th>
                      	<th>财富宝</th>
                      </tr>
                      {volist name="buy_list" id="vo"}
                      <tr>
                        <td>{$vo.createtime|datetime}</td>
                        <td>{$vo.market_price}</td>
                        <td>{$vo.money}</td>
                      </tr>
                      {/volist}
                     </table>
              	</div>
              </div>

            </div>
          </div>
        <div class="swiper-slide">
            <div class="content-slide">
              {empty name="trade_list"}
             <div class="nolist">
                 <img src="__CDN__/assets/img/bikebi/nolist.png">
             </div>
             {else /}

                  <!-- 新加头 -->
            <div class="entrust_list">

              {volist name="trade_list" id="vo"}
              <div class="entrust_list_one">
                 <div class="entrust_list_up">
                   <div class="entrust_list_up_left">
                     <p class="num">{$vo.money}</p>
                     <p>委托数量</p>
                   </div>
                   <div class="entrust_list_up_mid"> 
                     <p>委托成功：{php}echo money_format_new($vo['money'] - $vo['balance']);{/php}</p>
                     <p>委托失败：0.0000</p>
                   </div>
                   <div class="entrust_list_up_right">
                     <p>{eq name="vo.type" value="0"}买{else /}卖{/eq}</p>
                   </div>
                 </div>
                 <div class="entrust_list_down">
                   <div class="entrust_list_down_left">
                     <p>{$vo.createtime|datetime}</p>
                   </div>
                   <div class="entrust_list_down_right">
                      <a href="{:url('user/entrust_detail', ['id'=>$vo['id']])}"><p>详情</p></a>
                   </div>
                  </div>

                  {eq name="vo.can_cancel" value="1"}
                  <form method="post" action="{:url('order/cancel')}" onsubmit="return confirm('确认要取消这个委托吗？');">
                  <input type="hidden" name="id" value="{$vo.id}">
                       <div class="entrust_info_submit">
                           <input type="submit" value="取消委托" class="btn btn-defaul">
                       </div>
                  </form>
                  {/eq}
              </div>
              {/volist}

              <div class="entrust_list_one" style="display: none;">
                 <div class="entrust_list_up">
                   <div class="entrust_list_up_left">
                     <p class="num">49.0467</p>
                     <p>委托数量</p>
                   </div>
                   <div class="entrust_list_up_mid"> 
                     <p>委托成功：50.0000</p>
                     <p>委托失败：0.0000</p>
                   </div>
                   <div class="entrust_list_up_right">
                     <p>卖</p>
                   </div>
                 </div>
                 <div class="entrust_list_down">
                   <div class="entrust_list_down_left">
                     <p>2018-06-09 20:06:22</p>
                   </div>
                   <div class="entrust_list_down_right">
                      <a href="{:url('user/entrust_detail')}"><p>详情</p></a>
                   </div>
                  </div>
              </div>

            </div>
    <!-- 新加尾 -->
          {/empty}

            </div>
          </div>
         <div class="swiper-slide">
            <div class="content-slide">
              {empty name="history_list"}
             <div class="nolist">
                 <img src="__CDN__/assets/img/bikebi/nolist.png">
             </div>
             {else /}
              <div class="entrust_list">
              {volist name="history_list" id="vo"}
              <div class="entrust_list_one">
                 <div class="entrust_list_up">
                   <div class="entrust_list_up_left">
                     <p class="num">{$vo.money}</p>
                     <p>委托数量</p>
                   </div>
                   <div class="entrust_list_up_mid"> 
                     <p>委托成功：{php}echo money_format_new($vo['money'] - $vo['balance']);{/php}</p>
                     <p>委托失败：{eq name="vo.status" value="1"}{$vo.balance}{else /}0.0000{/eq}</p>
                   </div>
                   <div class="entrust_list_up_right">
                     <p>{eq name="vo.type" value="0"}买{else /}卖{/eq}</p>
                   </div>
                 </div>
                 <div class="entrust_list_down">
                   <div class="entrust_list_down_left">
                     <p>{$vo.createtime|datetime}</p>
                   </div>
                   <div class="entrust_list_down_right">
                      <a href="{:url('user/entrust_detail', ['id'=>$vo['id']])}"><p>详情</p></a>
                   </div>
                  </div>

              </div>
              {/volist}
            </div>
             {/empty}


            </div>
          </div>
      </div>
   </div>
</div>

<!-- <div class="footer">
  <div class="container-fluid">
  <div class="row">
    <a href="{:url('index/index')}">
    <div class="col-xs-3"> 
      <img src="__CDN__/assets/img/bikebi/shouye2.png">
        <p>首页</p> 
    </div>
      </a>
      <a href="{:url('index/user/jiaoyi')}">
    <div class="col-xs-3"> 
       <img src="__CDN__/assets/img/bikebi/jiaoyi.png">
         <p style="color: #1C86EE;">交易</p>
    </div>
      </a>
      <a href="{:url('index/apply/index')}">
    <div class="col-xs-3"> 
       <img src="__CDN__/assets/img/bikebi/app2.png">
         <p>应用</p>
    </div>
      </a>
      <a href="{:url('index/user/index')}">
    <div class="col-xs-3"> 
       <img src="__CDN__/assets/img/bikebi/mine2.png">
         <p>我的</p>
    </div>
      </a>
  </div>
    </div>
</div> -->
{include file="common/footer"}

<script src="http://www.lanrenzhijia.com/ajaxjs/jquery-1.10.1.min.js"></script> 
<script src="http://www.lanrenzhijia.com/ajaxjs/idangerous.swiper.min.js"></script> 
<script>
var tabsSwiper = new Swiper('.swiper-container',{
	speed:500,
	onSlideChangeStart: function(){
		$(".tabs .active").removeClass('active');
		$(".tabs a").eq(tabsSwiper.activeIndex).addClass('active');
	}
});

$(".tabs a").on('touchstart mousedown',function(e){
	e.preventDefault()
	$(".tabs .active").removeClass('active');
	$(this).addClass('active');
	tabsSwiper.swipeTo($(this).index());
});

$(".tabs a").click(function(e){
	e.preventDefault();
});
</script>
</body>
</html>